knitr::opts_knit$set(root.dir = normalizePath("."))
# Load phyloseq object as inc.physeq, not rarefied but unclassified OTUs removed if at phylum level
inc.physeq <- readRDS("data/RDS/not.rare.nounclass")
# LFC calculation function
who_diff_day <- function(DDS, choice1, choice2, phy.object){
res = results(DDS, contrast = c("Treatment_Response", choice1, choice2), cooksCutoff = FALSE)
#plotCounts(AlfalfaDDS, gene="OTU_311", intgroup="day")
#Use above line to check if an OTU is increasing or decreasing depending on order of contrast
alpha = 0.01
#alpha = 0.1
sigtab = res[which(res$padj < alpha), ]
sigtab = cbind(as(sigtab, "data.frame"), as(tax_table(phy.object)[rownames(sigtab), ], "matrix"))
theme_set(theme_bw())
scale_fill_discrete <- function(palname = "Set1", ...) {
scale_fill_brewer(palette = palname, ...)
}
# Phylum order
x = tapply(sigtab$log2FoldChange, sigtab$Phylum, function(x) max(x))
x = sort(x, TRUE)
sigtab$Phylum = factor(as.character(sigtab$Phylum), levels=names(x))
# Genus order
x = tapply(sigtab$log2FoldChange, sigtab$Genus, function(x) max(x))
x = sort(x, TRUE)
sigtab$Genus = factor(as.character(sigtab$Genus), levels=names(x))
#ggplot(sigtab, aes(x=Genus, y=log2FoldChange, color=phylum)) + geom_point(size=2) +
# theme(axis.text.x = element_text(angle = -90, hjust = 0, vjust=1.0)) +
# ggtitle("Day 0 to Day 7")
return(sigtab)
}
# function plot log2FoldChange
log_plot <- function(sigtab,t1){
sigtab <- sigtab %>%
rownames_to_column(var = "OTU") %>%
filter(log2FoldChange >= 2)
ggplot(sigtab, aes(x=Genus, y=log2FoldChange, color=Phylum)) + geom_point(size=2) +
coord_flip() +
ggtitle(t1)
}
## Early
alf.early <- subset_samples(inc.physeq, Treatment_Response %in% c("Alfalfa_early", "Reference_early")) %>%
filter_taxa(function(x) sum(x) >= 3, T)
# Be very careful of the design formula in the who_diff_day() function
# This function also selects only LFC >= 2 and alpha 0.01 for significant and increasing otus to be returned
log.plot.early.alf <- alf.early %>%
phyloseq_to_deseq2( ~ Treatment_Response) %>%
DESeq(test = "Wald", fitType = "local") %>%
who_diff_day("Alfalfa_early", "Reference_early", alf.early) %>%
log_plot("Alfalfa OTUS in early group that are significantly changing compared to reference early")
# Save a data frame of these results
log.plot.early.alf.data <- log.plot.early.alf$data %>%
mutate(trt = c("Alfalfa_early"))
# print plot with viridis color
log.plot.early.alf + scale_colour_viridis_d(option = "plasma") +
theme_dark()
## Late
alf.late <- subset_samples(inc.physeq, Treatment_Response %in% c("Alfalfa_late", "Reference_late")) %>%
filter_taxa(function(x) sum(x) >= 3, T)
# Make deseq and plot as above
log.plot.late.alf <- alf.late %>%
phyloseq_to_deseq2( ~ Treatment_Response) %>%
DESeq(test = "Wald", fitType = "local") %>%
who_diff_day("Alfalfa_late", "Reference_late", alf.late) %>%
log_plot("Alfalfa OTUS in late group that are significantly changing compared to reference late")
# Save a data frame of these results
log.plot.late.alf.data <- log.plot.late.alf$data %>%
mutate(trt = c("Alfalfa_late"))
# print plot with viridis color
log.plot.late.alf + scale_colour_viridis_d(option = "plasma") +
theme_dark()
# Common to both early and late with LFC >=2
otustokeep <- intersect(log.plot.early.alf.data$OTU, log.plot.late.alf.data$OTU)
# Trim and rename variables
early_alf_OTUS <- log.plot.early.alf.data %>%
select(OTU, Phylum, Class, Order, Family, Genus, Alfalfa_early_log2FoldChange = log2FoldChange)
late_alf_OTUS <- log.plot.late.alf.data %>%
select(OTU, Phylum, Class, Order, Family, Genus, Alfalfa_late_log2FoldChange = log2FoldChange)
# join early and late
all_alf <- full_join(early_alf_OTUS, late_alf_OTUS)
This plot is showing the common OTUs with LFC > 3 while also showing the LFC of OTUs observed in only early or late, represented by the points landing below 2 on either axis. Common OTUs with LFC < 3 are left unlabeled.
p <- ggplot(all_alf,
aes(x = Alfalfa_early_log2FoldChange,
y = Alfalfa_late_log2FoldChange,
color = Phylum,
label = OTU)) +
geom_miss_point() +
geom_text_repel(aes(label=ifelse(Alfalfa_early_log2FoldChange>3 & Alfalfa_late_log2FoldChange>3,as.character(OTU),'')),hjust=0,vjust=0)
p + scale_colour_viridis_d(option = "plasma") +
theme_dark()
# Save this list of alfalfa LFC > 2 for more plots
saveRDS(all_alf, file = "data/RDS/LFC_alf_OTUs_June19.RDS")
These OTUs had response greater than 3 in both early and late alfalfa
OTUs <- all_alf %>%
filter(Alfalfa_early_log2FoldChange>3 & Alfalfa_late_log2FoldChange>3)
kable(OTUs) %>%
kable_styling(bootstrap_options = "striped") %>%
scroll_box(width = "100%", height = "400px")
| OTU | Phylum | Class | Order | Family | Genus | Alfalfa_early_log2FoldChange | Alfalfa_late_log2FoldChange |
|---|---|---|---|---|---|---|---|
| Otu00064 | Proteobacteria | Gammaproteobacteria | Pseudomonadales | Pseudomonadaceae | Pseudomonas | 5.426305 | 4.854536 |
| Otu00098 | Proteobacteria | Deltaproteobacteria | Myxococcales | Nannocystaceae | Nannocystis | 3.656891 | 4.493757 |
| Otu00138 | Verrucomicrobia | Verrucomicrobia_unclassified | Verrucomicrobia_unclassified | Verrucomicrobia_unclassified | Verrucomicrobia_unclassified | 4.040318 | 3.635486 |
| Otu00149 | Firmicutes | Bacilli | Bacillales | Bacillaceae_1 | Bacillus | 3.235475 | 3.545502 |
| Otu00151 | Verrucomicrobia | Verrucomicrobia_unclassified | Verrucomicrobia_unclassified | Verrucomicrobia_unclassified | Verrucomicrobia_unclassified | 4.155508 | 3.249719 |
| Otu00222 | Firmicutes | Bacilli | Bacillales | Planococcaceae | Sporosarcina | 3.929644 | 3.827824 |
| Otu00400 | Bacteroidetes | Bacteroidetes_incertae_sedis | Ohtaekwangia | Ohtaekwangia_unclassified | Ohtaekwangia_unclassified | 3.443471 | 4.371128 |
| Otu00439 | candidate_division_WPS-1 | candidate_division_WPS-1_unclassified | candidate_division_WPS-1_unclassified | candidate_division_WPS-1_unclassified | candidate_division_WPS-1_unclassified | 3.679809 | 3.260877 |
| Otu00494 | Proteobacteria | Gammaproteobacteria | Pseudomonadales | Pseudomonadaceae | Pseudomonas | 5.694554 | 3.973771 |
| Otu00517 | Proteobacteria | Alphaproteobacteria | Caulobacterales | Caulobacteraceae | Caulobacter | 3.281417 | 3.061991 |
| Otu00557 | Firmicutes | Bacilli | Bacillales | Planococcaceae | Planococcaceae_unclassified | 3.612917 | 3.111851 |
| Otu00608 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 3.306852 | 5.381203 |
| Otu00614 | Proteobacteria | Gammaproteobacteria | Enterobacteriales | Enterobacteriaceae | Enterobacteriaceae_unclassified | 5.809232 | 4.037280 |
| Otu00666 | Proteobacteria | Deltaproteobacteria | Bdellovibrionales | Bdellovibrionaceae | Bdellovibrio | 5.037616 | 4.181329 |
| Otu00717 | Verrucomicrobia | Verrucomicrobiae | Verrucomicrobiales | Verrucomicrobiaceae | Roseimicrobium | 4.500848 | 3.479294 |
| Otu00728 | Proteobacteria | Alphaproteobacteria | Rhizobiales | Rhizobiales_unclassified | Rhizobiales_unclassified | 4.802462 | 3.450962 |
| Otu00737 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 3.494724 | 3.516254 |
| Otu00808 | Firmicutes | Bacilli | Bacillales | Paenibacillaceae_1 | Paenibacillus | 4.413060 | 5.227285 |
| Otu00832 | Firmicutes | Bacilli | Bacillales | Paenibacillaceae_1 | Brevibacillus | 5.091440 | 6.429205 |
| Otu00847 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 4.145200 | 4.795919 |
| Otu00933 | Proteobacteria | Gammaproteobacteria | Xanthomonadales | Xanthomonadaceae | Pseudoxanthomonas | 4.604627 | 3.095884 |
| Otu00953 | Firmicutes | Bacilli | Bacillales | Alicyclobacillaceae | Tumebacillus | 4.283473 | 4.255385 |
| Otu00995 | Actinobacteria | Actinobacteria | Actinomycetales | Cellulomonadaceae | Cellulomonas | 4.665178 | 3.133432 |
| Otu01203 | Proteobacteria | Deltaproteobacteria | Myxococcales | Polyangiaceae | Byssovorax | 4.122999 | 4.983632 |
| Otu01264 | Bacteroidetes | Cytophagia | Cytophagales | Cytophagaceae | Sporocytophaga | 4.386096 | 3.703749 |
| Otu01303 | Proteobacteria | Deltaproteobacteria | Myxococcales | Polyangiaceae | Byssovorax | 4.202493 | 3.879818 |
| Otu01345 | Verrucomicrobia | Verrucomicrobiae | Verrucomicrobiales | Verrucomicrobiaceae | Verrucomicrobium | 4.859902 | 3.023443 |
| Otu01355 | Firmicutes | Bacilli | Bacillales | Bacillales_unclassified | Bacillales_unclassified | 3.389340 | 4.358994 |
| Otu01556 | Proteobacteria | Alphaproteobacteria | Caulobacterales | Caulobacteraceae | Caulobacteraceae_unclassified | 4.705944 | 3.320603 |
| Otu01560 | Verrucomicrobia | Spartobacteria | Spartobacteria_unclassified | Spartobacteria_unclassified | Spartobacteria_unclassified | 3.580680 | 3.524340 |
| Otu01602 | Proteobacteria | Gammaproteobacteria | Xanthomonadales | Xanthomonadaceae | Pseudoxanthomonas | 3.457083 | 3.412073 |
| Otu01694 | Proteobacteria | Betaproteobacteria | Burkholderiales | Burkholderiaceae | Cupriavidus | 4.414078 | 3.667559 |
| Otu01743 | Firmicutes | Bacilli | Bacillales | Alicyclobacillaceae | Tumebacillus | 3.816464 | 4.277178 |
| Otu01749 | Bacteroidetes | Sphingobacteriia | Sphingobacteriales | Chitinophagaceae | Chitinophagaceae_unclassified | 3.527269 | 3.134364 |
| Otu01800 | Proteobacteria | Alphaproteobacteria | Alphaproteobacteria_unclassified | Alphaproteobacteria_unclassified | Alphaproteobacteria_unclassified | 3.048795 | 3.782811 |
| Otu02505 | Proteobacteria | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | 3.047140 | 3.041070 |
## Early
comp.early <- subset_samples(inc.physeq, Treatment_Response %in% c("Compost_early", "Reference_early")) %>%
filter_taxa(function(x) sum(x) >= 3, T)
# Be very careful of the design formula in the who_diff_day() function
# This function also selects only LFC >= 2 and alpha 0.01 for significant and increasing otus to be returned
log.plot.early.comp <- comp.early %>%
phyloseq_to_deseq2( ~ Treatment_Response) %>%
DESeq(test = "Wald", fitType = "local") %>%
who_diff_day("Compost_early", "Reference_early", comp.early) %>%
log_plot("Compost OTUS in early group that are significantly changing compared to reference early")
# Save a data frame of these results
log.plot.early.comp.data <- log.plot.early.comp$data %>%
mutate(trt = c("Compost_early"))
# print plot with viridis color
log.plot.early.comp + scale_colour_viridis_d(option = "plasma") +
theme_dark()
## Late
comp.late <- subset_samples(inc.physeq, Treatment_Response %in% c("Compost_late", "Reference_late")) %>%
filter_taxa(function(x) sum(x) >= 3, T)
# Make deseq and plot as above
log.plot.late.comp <- comp.late %>%
phyloseq_to_deseq2( ~ Treatment_Response) %>%
DESeq(test = "Wald", fitType = "local") %>%
who_diff_day("Compost_late", "Reference_late", comp.late) %>%
log_plot("Compost OTUS in late group that are significantly changing compared to reference late")
# Save a data frame of these results
log.plot.late.comp.data <- log.plot.late.comp$data %>%
mutate(trt = c("Compost_late"))
# print plot with viridis color
log.plot.late.comp + scale_colour_viridis_d(option = "plasma") +
theme_dark()
# Common to both early and late with LFC >=2
otustokeep <- intersect(log.plot.early.comp.data$OTU, log.plot.late.comp.data$OTU)
# Trim and rename variables
early_comp_OTUS <- log.plot.early.comp.data %>%
select(OTU, Phylum, Class, Order, Family, Genus, Compost_early_log2FoldChange = log2FoldChange)
late_comp_OTUS <- log.plot.late.comp.data %>%
select(OTU, Phylum, Class, Order, Family, Genus, Compost_late_log2FoldChange = log2FoldChange)
# join early and late
all_comp <- full_join(early_comp_OTUS, late_comp_OTUS)
This plot is showing the common OTUs with LFC > 3 while also showing the LFC of OTUs observed in only early or late, represented by the points landing below 2 on either axis. Common OTUs with LFC < 3 are left unlabeled.
p <- ggplot(all_comp,
aes(x = Compost_early_log2FoldChange,
y = Compost_late_log2FoldChange,
color = Phylum,
label = OTU)) +
geom_miss_point() +
geom_text_repel(aes(label=ifelse(Compost_early_log2FoldChange>3 & Compost_late_log2FoldChange>3,as.character(OTU),'')),hjust=0,vjust=0)
p + scale_colour_viridis_d(option = "plasma") +
theme_dark()
# Save this list of compcompa LFC > 2 for more plots
saveRDS(all_comp, file = "data/RDS/LFC_comp_OTUs_June19.RDS")
These OTUs had response greater than 3 in both early and late compcompa
OTUs <- all_comp %>%
filter(Compost_early_log2FoldChange>3 & Compost_late_log2FoldChange>3)
kable(OTUs) %>%
kable_styling(bootstrap_options = "striped") %>%
scroll_box(width = "100%", height = "400px")
| OTU | Phylum | Class | Order | Family | Genus | Compost_early_log2FoldChange | Compost_late_log2FoldChange |
|---|---|---|---|---|---|---|---|
| Otu00022 | Chloroflexi | Thermomicrobia | Sphaerobacterales | Sphaerobacteraceae | Sphaerobacter | 7.333830 | 6.397724 |
| Otu00092 | Actinobacteria | Actinobacteria | Actinomycetales | Glycomycetaceae | Glycomyces | 5.810926 | 3.448520 |
| Otu00103 | Proteobacteria | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | 5.133128 | 6.224653 |
| Otu00107 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 3.367819 | 5.149622 |
| Otu00127 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 3.231907 | 3.339249 |
| Otu00130 | Actinobacteria | Actinobacteria | Actinomycetales | Nocardiopsaceae | Thermobifida | 6.563901 | 5.247507 |
| Otu00139 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 6.125951 | 5.054827 |
| Otu00233 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 3.817501 | 4.428101 |
| Otu00277 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 4.564746 | 4.587303 |
| Otu00279 | Actinobacteria | Actinobacteria | Actinomycetales | Actinomycetales_unclassified | Actinomycetales_unclassified | 4.061483 | 3.124985 |
| Otu00281 | Proteobacteria | Gammaproteobacteria | Gammaproteobacteria_unclassified | Gammaproteobacteria_unclassified | Gammaproteobacteria_unclassified | 4.718963 | 4.305848 |
| Otu00298 | Actinobacteria | Actinobacteria | Actinomycetales | Thermomonosporaceae | Actinomadura | 3.960899 | 3.648603 |
| Otu00331 | Verrucomicrobia | Opitutae | Opitutales | Opitutaceae | Opitutaceae_unclassified | 4.244084 | 4.339431 |
| Otu00378 | Chloroflexi | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | 6.595953 | 5.560310 |
| Otu00395 | Proteobacteria | Gammaproteobacteria | Alteromonadales | Alteromonadaceae | Haliea | 4.690868 | 4.920388 |
| Otu00477 | Proteobacteria | Alphaproteobacteria | Caulobacterales | Caulobacteraceae | Asticcacaulis | 5.251184 | 3.067774 |
| Otu00564 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Pirellula | 3.289989 | 3.060541 |
| Otu00608 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 3.623800 | 4.806582 |
| Otu00655 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 6.766203 | 5.657540 |
| Otu00737 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 5.019151 | 4.032267 |
| Otu00847 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 4.531744 | 4.556528 |
| Otu00881 | Proteobacteria | Deltaproteobacteria | Deltaproteobacteria_unclassified | Deltaproteobacteria_unclassified | Deltaproteobacteria_unclassified | 3.045813 | 3.454454 |
| Otu00952 | Proteobacteria | Gammaproteobacteria | Gammaproteobacteria_unclassified | Gammaproteobacteria_unclassified | Gammaproteobacteria_unclassified | 3.788132 | 4.282470 |
| Otu00985 | Chloroflexi | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | 4.917675 | 3.056024 |
| Otu01202 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 3.086641 | 4.196262 |
| Otu01212 | Proteobacteria | Alphaproteobacteria | Alphaproteobacteria_unclassified | Alphaproteobacteria_unclassified | Alphaproteobacteria_unclassified | 3.249781 | 5.466143 |
| Otu01264 | Bacteroidetes | Cytophagia | Cytophagales | Cytophagaceae | Sporocytophaga | 4.666925 | 3.659067 |
| Otu01298 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Rhodopirellula | 3.637536 | 5.278672 |
| Otu01337 | Bacteroidetes | Bacteroidetes_incertae_sedis | Ohtaekwangia | Ohtaekwangia_unclassified | Ohtaekwangia_unclassified | 3.110281 | 3.514531 |
| Otu01380 | Firmicutes | Bacilli | Bacillales | Paenibacillaceae_1 | Paenibacillus | 5.614766 | 3.242234 |
| Otu01442 | Proteobacteria | Deltaproteobacteria | Deltaproteobacteria_unclassified | Deltaproteobacteria_unclassified | Deltaproteobacteria_unclassified | 3.829121 | 3.432062 |
| Otu01488 | Firmicutes | Clostridia | Halanaerobiales | Halanaerobiaceae | Halocella | 3.450090 | 3.202642 |
| Otu01490 | Chloroflexi | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | 4.851297 | 3.848434 |
| Otu01874 | Proteobacteria | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | 3.347806 | 4.049496 |
| Otu01912 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Pirellula | 3.337455 | 3.138712 |
| Otu02494 | Proteobacteria | Alphaproteobacteria | Sphingomonadales | Sphingomonadaceae | Sphingomonas | 3.113915 | 3.611850 |
## Early
mix.early <- subset_samples(inc.physeq, Treatment_Response %in% c("Mix_early", "Reference_early")) %>%
filter_taxa(function(x) sum(x) >= 3, T)
# Be very careful of the design formula in the who_diff_day() function
# This function also selects only LFC >= 2 and alpha 0.01 for significant and increasing otus to be returned
log.plot.early.mix <- mix.early %>%
phyloseq_to_deseq2( ~ Treatment_Response) %>%
DESeq(test = "Wald", fitType = "local") %>%
who_diff_day("Mix_early", "Reference_early", mix.early) %>%
log_plot("Mix OTUS in early group that are significantly changing mixared to reference early")
# Save a data frame of these results
log.plot.early.mix.data <- log.plot.early.mix$data %>%
mutate(trt = c("Mix_early"))
# print plot with viridis color
log.plot.early.mix + scale_colour_viridis_d(option = "plasma") +
theme_dark()
## Late
mix.late <- subset_samples(inc.physeq, Treatment_Response %in% c("Mix_late", "Reference_late")) %>%
filter_taxa(function(x) sum(x) >= 3, T)
# Make deseq and plot as above
log.plot.late.mix <- mix.late %>%
phyloseq_to_deseq2( ~ Treatment_Response) %>%
DESeq(test = "Wald", fitType = "local") %>%
who_diff_day("Mix_late", "Reference_late", mix.late) %>%
log_plot("Mix OTUS in late group that are significantly changing mixared to reference late")
# Save a data frame of these results
log.plot.late.mix.data <- log.plot.late.mix$data %>%
mutate(trt = c("Mix_late"))
# print plot with viridis color
log.plot.late.mix + scale_colour_viridis_d(option = "plasma") +
theme_dark()
# Common to both early and late with LFC >=2
otustokeep <- intersect(log.plot.early.mix.data$OTU, log.plot.late.mix.data$OTU)
# Trim and rename variables
early_mix_OTUS <- log.plot.early.mix.data %>%
select(OTU, Phylum, Class, Order, Family, Genus, Mix_early_log2FoldChange = log2FoldChange)
late_mix_OTUS <- log.plot.late.mix.data %>%
select(OTU, Phylum, Class, Order, Family, Genus, Mix_late_log2FoldChange = log2FoldChange)
# join early and late
all_mix <- full_join(early_mix_OTUS, late_mix_OTUS)
This plot is showing the common OTUs with LFC > 3 while also showing the LFC of OTUs observed in only early or late, represented by the points landing below 2 on either axis. Common OTUs with LFC < 3 are left unlabeled.
p <- ggplot(all_mix,
aes(x = Mix_early_log2FoldChange,
y = Mix_late_log2FoldChange,
color = Phylum,
label = OTU)) +
geom_miss_point() +
geom_text_repel(aes(label=ifelse(Mix_early_log2FoldChange>3 & Mix_late_log2FoldChange>3,as.character(OTU),'')),hjust=0,vjust=0)
p + scale_colour_viridis_d(option = "plasma") +
theme_dark()
# Save this list of mixmixa LFC > 2 for more plots
saveRDS(all_mix, file = "data/RDS/LFC_mix_OTUs_June19.RDS")
These OTUs had response greater than 3 in both early and late mixmixa
OTUs <- all_mix %>%
filter(Mix_early_log2FoldChange>3 & Mix_late_log2FoldChange>3)
kable(OTUs) %>%
kable_styling(bootstrap_options = "striped") %>%
scroll_box(width = "100%", height = "400px")
| OTU | Phylum | Class | Order | Family | Genus | Mix_early_log2FoldChange | Mix_late_log2FoldChange |
|---|---|---|---|---|---|---|---|
| Otu00022 | Chloroflexi | Thermomicrobia | Sphaerobacterales | Sphaerobacteraceae | Sphaerobacter | 5.603070 | 4.400343 |
| Otu00098 | Proteobacteria | Deltaproteobacteria | Myxococcales | Nannocystaceae | Nannocystis | 3.368089 | 3.530743 |
| Otu00103 | Proteobacteria | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | Proteobacteria_unclassified | 4.425215 | 4.625760 |
| Otu00130 | Actinobacteria | Actinobacteria | Actinomycetales | Nocardiopsaceae | Thermobifida | 4.795846 | 4.141254 |
| Otu00139 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 5.804734 | 3.702383 |
| Otu00222 | Firmicutes | Bacilli | Bacillales | Planococcaceae | Sporosarcina | 3.461706 | 3.132583 |
| Otu00277 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 4.021133 | 3.214944 |
| Otu00281 | Proteobacteria | Gammaproteobacteria | Gammaproteobacteria_unclassified | Gammaproteobacteria_unclassified | Gammaproteobacteria_unclassified | 3.755055 | 3.353680 |
| Otu00298 | Actinobacteria | Actinobacteria | Actinomycetales | Thermomonosporaceae | Actinomadura | 3.171157 | 3.001881 |
| Otu00331 | Verrucomicrobia | Opitutae | Opitutales | Opitutaceae | Opitutaceae_unclassified | 3.562399 | 3.430582 |
| Otu00378 | Chloroflexi | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | Chloroflexi_unclassified | 5.159133 | 3.273742 |
| Otu00395 | Proteobacteria | Gammaproteobacteria | Alteromonadales | Alteromonadaceae | Haliea | 3.823497 | 3.638668 |
| Otu00400 | Bacteroidetes | Bacteroidetes_incertae_sedis | Ohtaekwangia | Ohtaekwangia_unclassified | Ohtaekwangia_unclassified | 3.134202 | 3.736313 |
| Otu00606 | Bacteroidetes | Bacteroidetes_incertae_sedis | Ohtaekwangia | Ohtaekwangia_unclassified | Ohtaekwangia_unclassified | 3.315817 | 3.283691 |
| Otu00608 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 3.575534 | 4.350690 |
| Otu00737 | Proteobacteria | Deltaproteobacteria | Myxococcales | Myxococcales_unclassified | Myxococcales_unclassified | 4.105522 | 3.647305 |
| Otu00808 | Firmicutes | Bacilli | Bacillales | Paenibacillaceae_1 | Paenibacillus | 4.657377 | 4.580972 |
| Otu00847 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 4.158366 | 4.386717 |
| Otu00953 | Firmicutes | Bacilli | Bacillales | Alicyclobacillaceae | Tumebacillus | 3.136044 | 3.011227 |
| Otu01202 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Planctomycetaceae_unclassified | 3.160087 | 3.758452 |
| Otu01232 | Proteobacteria | Betaproteobacteria | Betaproteobacteria_unclassified | Betaproteobacteria_unclassified | Betaproteobacteria_unclassified | 3.035368 | 4.552961 |
| Otu01264 | Bacteroidetes | Cytophagia | Cytophagales | Cytophagaceae | Sporocytophaga | 4.489835 | 3.262131 |
| Otu01298 | Planctomycetes | Planctomycetia | Planctomycetales | Planctomycetaceae | Rhodopirellula | 3.816093 | 4.824337 |
| Otu01939 | Firmicutes | Bacilli | Bacillales | Paenibacillaceae_1 | Paenibacillus | 3.779087 | 3.176198 |